package com.hennissy.controller;


import com.hennissy.entity.StoreType;
import com.hennissy.service.StoreTypeService;
import com.hennissy.utils.ResultAjax;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cjh
 * @since 2021-06-19
 */
@RestController
@RequestMapping("/storeType_api")
public class StoreTypeController {

    @Autowired
    private StoreTypeService storeTypeService;

    @ApiOperation("查询分店分类接口")
    @GetMapping("/list")
    public ResultAjax list(){

        List<StoreType> storeTypes = storeTypeService.list();
        return ResultAjax.ok(200,"ok",storeTypes,storeTypes.size());
    }

}

